<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org" layout:decorate="main"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" xmlns:form="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>新增用户信息</title>
</head>
<body>
<div layout:fragment="content">
    <div class="">
        <div class="clearfix"></div>
        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>新增用户信息 <i class="fa fa-user"></i></h2>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content">
                        <div class="clearfix"></div>
                        <form class="form-horizontal form-label-left" th:action="@{/user/save}" action="/user/save"
                              method="post">
                            <!--<input type="hidden" name="id" id="id" value="1">-->
                            <!--用户名-->
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="stdName"> 用户名 <span
                                        class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input id="stdName" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="10" data-validate-words="1" name="stdName"
                                           required="required"
                                           placeholder="请输入用户名" type="text">
                                </div>
                            </div>
                            <!--密码-->
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="password"> 密码 <span
                                        class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input id="password" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="10" data-validate-words="1" name="password"
                                           required="required"
                                           placeholder="请输入密码" type="password">
                                </div>
                            </div>
                            <!-- 年龄-->
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="age"> 年龄 <span
                                        class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input id="age" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="10" data-validate-words="1" name="age"
                                           required="required"
                                           placeholder="请输入年龄" type="text">
                                </div>
                            </div>
                            <!-- 年龄-->
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="grade"> 学历 <span
                                        class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input id="grade" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="10" data-validate-words="1" name="grade"
                                           required="required"
                                           placeholder="请输入学历" type="text">
                                </div>
                            </div>
                            <!-- 年龄-->
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="professional"> 专业
                                    <span
                                            class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input id="professional" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="10" data-validate-words="1"
                                           name="professional"
                                           required="required"
                                           placeholder="请输入专业" type="text">
                                </div>
                            </div>
                            <!-- 年龄-->
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="phone"> 电话号码
                                    <span
                                            class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input id="phone" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="10" data-validate-words="1"
                                           name="phone"
                                           required="required"
                                           placeholder="请输入电话号码" type="text">
                                </div>
                            </div>
                            <!-- 年龄-->
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="email"> 邮箱
                                    <span
                                            class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input id="email" class="form-control col-md-7 col-xs-12"
                                           data-validate-length-range="10" data-validate-words="1"
                                           name="email"
                                           required="required"
                                           placeholder="请输入邮箱" type="text">
                                </div>
                            </div>
                            <!--性别-->
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="sex"> 性别 <span
                                        class="required">*</span>
                                </label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <input type="radio" name="sex" value="1" checked="checked" id="sex">男
                                    <input type="radio" name="sex" value="0" id="sex">女
                                </div>
                            </div>
                            <div class="item form-group">
                                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="permission">
                                    用户角色
                                    <span
                                            class="required">*</span></label>
                                <div class="col-md-6 col-sm-6 col-xs-12">
                                    <select name="permission" id="permission" class="form-control"
                                            required="required">
                                        <option
                                                th:each="list1:${list}" th:value="${ list1.permissionId} "
                                                th:text="${list1.permissionName}">角色
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-6 col-md-offset-3">
                                    <button id="send" type="submit" class="btn btn-success" onclick="tj()">
                                        保存
                                    </button>
                                    <button type="button" class="btn btn-primary" id="back">返回</button>
                                    <br/><br/>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<!--<script layout:fragment="js">
    function tj(){
        var ok=$("#roleId").val();
        if(ok==0 || ok==null || ok=="") {
            alert("请选择角色!!!");
        }
    }
</script>-->
</html>